package com.lagou.edu.homeworkthymeleaf.service.impl;

import com.lagou.edu.homeworkthymeleaf.dao.ArticleMapper;
import com.lagou.edu.homeworkthymeleaf.pojo.Article;
import com.lagou.edu.homeworkthymeleaf.service.QueryArticle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class QueryArticleImpl implements QueryArticle {

    @Autowired
    private ArticleMapper articleMapper;

    @Override
    public Article queryArticle(Integer id) {
        return articleMapper.selectArticle(id);
    }

    @Override
    public Integer selectCount() {
        return articleMapper.selectCount();
    }
}
